<!-- widget grid -->
<section id="widget-grid" class="">
	<!-- row -->
	<div class="row">
		
		<!-- NEW WIDGET START -->
		<article class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
			
			<!-- Widget ID (each widget will need unique ID)-->
			<div class="jarviswidget" id="wid-id-0" data-widget-colorbutton="false" data-widget-editbutton="false" data-widget-togglebutton="false" data-widget-deletebutton="false" data-widget-custombutton="false" data-widget-sortable="false">
				<!-- widget options:
					usage: <div class="jarviswidget" id="wid-id-0" data-widget-editbutton="false">
					
					data-widget-colorbutton="false"	
					data-widget-editbutton="false"
					data-widget-togglebutton="false"
					data-widget-deletebutton="false"
					data-widget-fullscreenbutton="false"
					data-widget-custombutton="false"
					data-widget-collapsed="true" 
					data-widget-sortable="false"
					
				-->
				<header>
					<span class="widget-icon"> <i class="fa fa-align-justify"></i> </span>
					<h2>班线规则设置</h2>				
				</header>

				<!-- widget div-->
				<div role="content">
					
					<!-- widget edit box -->
					<div class="jarviswidget-editbox">
						<!-- This area used as dropdown edit box -->
						<!-- Normally there would be an input text box here to change widget title. 
							Use this area only if plan to let users change widget title --> 
					</div>
					<!-- end widget edit box -->
					
					<!-- widget content -->
					<div class="widget-body no-padding">
						<form class="smart-form" action="">
							<!-- this is what the user will see -->
							<fieldset>
								<div class="alert alert-info">
									<button data-dismiss="alert" class="close">×</button>
									<i class="fa-fw fa fa-info"></i>
									班线的执行规则属于全局设置，任何更改将影响顶级机构下所有的班线执行。
								</div>
								<hr /><br />

								<h6>设置参数：</h6>
								<div class="row">	
									<section class="col col-xs-12 col-md-12 padding-top-10">
										<div id="csbj" class="well well-light padding-10 show_tab">
											<table class="table">
												<tbody >
													<tr>
														<td width="50%">
															<label class="label"><strong>超时未发判定时间：</strong></label>
															<label class="input">
																<i class="icon-append fa fa-question-circle"></i>
																<input type="text" maxlength="3" class="input-sm" value="24">
																<b class="tooltip tooltip-bottom-right">
																<i class="fa fa-warning txt-color-teal"></i>
																利用超过计划发车时间的时段判定超时未发，请输入正整数。 
																</b>
															</label>
															<div class="note">
																单位：小时
															</div>
														</td>
														<td>
															
														</td>
													</tr>
												</tbody>
											</table>
											<div class="alert alert-warning margin-top-10">
												<i class="fa-fw fa fa-warning"></i>
												<strong>超时未发</strong> 是在已经超过<span class="txt-color-red">计划发车时间</span>后，由于车辆持续没有发车而最终判定的一种状态；超时未发的默认判定时间是24小时。
											</div>
											
											<table class="table">
												<tbody >
													<tr>
														<td width="50%">
															<label class="label"><strong>超时未到判定时间：</strong></label>
															<label class="input">
																<i class="icon-append fa fa-question-circle"></i>
																<input type="text" maxlength="3" class="input-sm" value="24">
																<b class="tooltip tooltip-bottom-right">
																<i class="fa fa-warning txt-color-teal"></i>
																利用超过计划到达时间的时段判定超时未到，请输入正整数。 
																</b>
															</label>
															<div class="note">
																单位：小时
															</div>
														</td>
														<td>
															
														</td>
													</tr>
												</tbody>
											</table>
											<div class="alert alert-warning margin-top-10">
												<i class="fa-fw fa fa-warning"></i>
												<strong>超时未到</strong> 是在已经超过<span class="txt-color-red">计划到达时间</span>后，由于车辆持续没有到达目的地而最终判定的一种状态.
											</div>
											
											<table class="table">
												<tbody >
													<tr>
														<td width="50%">
															<label class="label"><strong>发车计划往前回追时间：</strong></label>
															<label class="input">
																<i class="icon-append fa fa-question-circle"></i>
																<input type="text" maxlength="3" class="input-sm" value="2">
																<b class="tooltip tooltip-bottom-right">
																<i class="fa fa-warning txt-color-teal"></i>
																由计划发车时间回追的时段，请输入正整数。 
																</b>
															</label>
															<div class="note">
																单位：小时
															</div>
														</td>
														<td>
															<label class="label"><strong>发车计划往后回追时间：</strong></label>
															<label class="input">
																<i class="icon-append fa fa-question-circle"></i>
																<input type="text" maxlength="3" class="input-sm" value="24">
																<b class="tooltip tooltip-bottom-right">
																<i class="fa fa-warning txt-color-teal"></i>
																由计划到达时间往后回追的时间段，请输入正整数。 
																</b>
															</label>
															<div class="note">
																单位：小时
															</div>
														</td>
													</tr>
												</tbody>
											</table>
											<div class="alert alert-warning margin-top-10">
												<i class="fa-fw fa fa-warning"></i>
												<strong>时间回追</strong> 是由于创建发车计划晚于实际发车时间时，需要回追历史数据而判定出发或到达时间。<br />
												<span class="txt-color-red">注：回追的时间越长，准确性越低</span>
											</div>
											
											<table class="table">
												<tbody >
													<tr>
														<td width="50%">
															<label class="label"><strong>自动发车计划监控：</strong></label>
															<!-- <label class="select">
																<select name="org">
																	<option value="0" selected="selected">每个发车计划，发车前4个小时自动创建</option>
																	<option value="1">每天自动创建后一周的发车计划</option>
																	<option value="2">每月首日零点，创建当月的发车计划</option>
																</select> <i></i> 
															</label> -->
															<div class="row">
																<div class="col col-12">
																	<label class="radio pull-left">
																		<input type="radio" checked="checked" name="radio">
																		<i></i>每个发车计划，自动进入计划监控的时间提前</label><input type="text" value="2" size="3" /> 小时
																	<div class="clearfix"></div>
																	<label class="radio">
																		<input type="radio" name="radio">
																		<i></i>当天的发车计划全部在零点进入监控</label>
																</div>
															</div>
														</td>
														<td>
															
														</td>
													</tr>
												</tbody>
											</table>
											<div class="alert alert-warning margin-top-10">
												<i class="fa-fw fa fa-warning"></i>
												<strong>自动计划创建</strong> 根据用户自定义的规则自动产生周期性的发车计划.
											</div>
									</section>
								</div>
							</fieldset>
							<footer>
								<button class="btn btn-default" type="submit"> 取消 </button>
								<button class="btn btn-primary" type="submit"> 保存设置	</button>
							</footer>     
						</form>

					</div>
					<!-- end widget content -->
				</div>
				<!-- end widget div -->	
		  </div>
			<!-- end widget -->

		</article>
		<!-- WIDGET END -->
		
	</div>

	<!-- end row -->

	<!-- row -->

	<div class="row">

		<!-- a blank row to get started -->
			
	</div>

	<!-- end row -->
	</section>
<!-- end widget grid -->

<script type="text/javascript">
	
	pageSetUp();
	
	/*
	 * ALL PAGE RELATED SCRIPTS CAN GO BELOW HERE
	 * eg alert("my home function");
	 */
	$(".onoffswitch-checkbox").click(function(){
		if($(this).attr("checked")=="checked"){
			$(this).removeAttr("checked");
			}							
		else{
			$(this).attr("checked","checked");
			}
		});	

	/*
	 * TIMEPICKER
	 */

	 //Load time picker script

	loadScript("js/plugin/bootstrap-timepicker/bootstrap-timepicker.min.js", runTimePicker);

	function runTimePicker() {
	    $('#timePicker1,#timePicker3').timepicker({
			minuteStep: 1,
			//template: 'modal',
			appendWidgetTo: 'body',
			showSeconds: false,
			showMeridian: false,
			defaultTime: '22:00'
		});
		$('#timePicker2,#timePicker4').timepicker({
			minuteStep: 1,
			//template: 'modal',
			appendWidge5To: 'body',
			showSeconds: false,
			showMeridian: false,
			defaultTime: '6:00'
		});
		 $('#timePicker5').timepicker({
			minuteStep: 1,
			//template: 'modal',
			appendWidgetTo: 'body',
			showSeconds: false,
			showMeridian: false,
			defaultTime: '00:00'
		});
		$('#timePicker6').timepicker({
			minuteStep: 1,
			//template: 'modal',
			appendWidge5To: 'body',
			showSeconds: false,
			showMeridian: false,
			defaultTime: '23:59'
		});
	}	
</script>
